<?php
require_once('includes/config.php');
require_once('includes/sessions.php');

$stat = $db -> Execute("SELECT id, page, rank, miejsce, user FROM players WHERE email='".$_SESSION['email']."'");

$_POST['tekst'] = strip_tags($_POST['tekst']);
//require_once('includes/bbcodegwiazdki.php');
//$_POST['tekst'] = bbcodetohtml($_POST['tekst']);
$_POST['tekst'] = htmlspecialchars($_POST['tekst']);

$czas1 = date("H:i");
$_POST['do'] = (int) $_POST['do'];
if ($stat -> fields['id'] != $_POST['do'] && $_POST['do'] != '') $db -> Execute("INSERT INTO `priv` (`user`, `chat`, `senderid`, `ownerid`, `czas`) VALUES('".$stat -> fields['user']."', '".$_POST['tekst']."', ".$stat -> fields['id'].", '".$_POST['do']."', '".$czas1."')");



header("Location: priv.php");
?>
